import request from './request'

export function getNoticeList(data) {
    return request({
        url: '/notice/page',
        method: 'post',
        data
    })
}
export function selectAll(data) {
    return request({
        url: '/notice/selectAll',
        method: 'post',
        data
    })
}
export function updateNoticeData(data) {
    return request({
        url: '/notice/update',
        method: 'put',
        data
    })
}
export function changeOpenData(id,open) {
    return request({
        url: '/notice/changeOpen',
        method: 'put',
        params:{
            id:id,
            open:open
        }
    })
}
export function addNoticeData(data) {
    return request({
        url: '/notice/add',
        method: 'post',
        data
    })
}
export function deleteNoticeData(id) {
    return request({
        url: '/notice/delete/'+id,
        method: 'delete',
        // params:{
        //     id:id
        // }
    })
}
export function getNoticeById(id) {
    return request({
        url: '/notice/select/'+id,
        method: 'get',
    })
}
export function deleteBatchNoticeData(ids) {
    return request({
        url: '/notice/delete/batch',
        method: 'delete',
        params: {
            ids:ids
          }
    })
}
